<include file="__THEME__/public_header" />
<!--main-->

<div class="worap-login back">
  <div class="title"><span class="onactive">找回密码</span></div>
  <div class="login-Cipher" >
     <div id="repPhone">
     
    	<h3 class="fb ft24 lh88" style="margin-left:20px;margin-bottom:20px;">重置密码</h3>
    	 <ul class="login-Cipher-ul">
              <label class="label">新&nbsp;密&nbsp;码:</label>
              <input event-node="password" id="password" name="password" type="password" class="regsiter-width" />
            </li>
            <li>
              <label class="label">确定密码:</label>
            <input event-node="repassword" id="repassword" name="repassword" type="password" class="regsiter-width" />
            </li>
    </ul>
   	<input type="hidden" id="code" name="code" value="{$code}" />
    <input name="" class="regsiter-xy-submit" type="button" onclick="ajaxPwdFrom();" value="下 一 步"/>

    </div>  
    </div>
  </div>

<script type="text/javascript">
/**
 * 异步提交操作
 * @return void
 */
var ajaxPwdFrom = function()
{
	var code=$("#code").val();
	var password=$("#password").val();
	var repassword=$("#repassword").val();
	//验证手机
    $.ajax({
        type: "POST",
        url:"{:U('public/Passport/doResetPassword')}",
        data:"code="+code+"&password="+password+"&repassword="+repassword,
        dataType:"json",
        success:function(data){
        	 if(data.status=='0'){
            	 notes(data.info,'failure');	
            	 return;
            }else{
            	 location.href = '<php> echo $GLOBALS['ts']['site']['home_url']; </php>';
            }
           
        }
    }); 
};
</script>
<include file="__THEME__/public_footer_g" />